-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http2: support passing options of http2.connect to net.connect #29816
Conversation
cc @nodejs/http2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We should probably update the docs as well.
@@ -2897,7 +2897,7 @@ function connect(authority, options, listener) { | |||
} else { | |||
switch (protocol) { | |||
case 'http:': | |||
socket = net.connect(options.port || port, options.host || host); | |||
socket = net.connect({ port, host, ...options }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that options.host
and options.port
would now take precedence over those same fields in authority
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intentional that options.host and options.port would now take precedence over those same fields in authority
I think yes, however this behavior wasn't changed here but in #28584.
PR-URL: #29816 Fixes: #29811 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
Landed in 95266db. |
PR-URL: #29816 Fixes: #29811 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
Fixes: #29811
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes